3.251 \(\int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx\)

Optimal. Leaf size=464 \[ \frac{a^2 \left (6 A d \left (-44 c^2 d^2-10 c^3 d+c^4-40 c d^3-12 d^4\right )-B \left (47 c^3 d^2+208 c^2 d^3-12 c^4 d+2 c^5+216 c d^4+64 d^5\right )\right ) \cos (e+f x)}{60 d^2 f}+\frac{a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac{a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (-12 c^2 d+2 c^3+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac{a^2 \left (6 A d \left (-20 c^2 d+2 c^3-57 c d^2-30 d^3\right )-B \left (96 c^2 d^2-24 c^3 d+4 c^4+284 c d^3+165 d^4\right )\right ) \sin (e+f x) \cos (e+f x)}{240 d f}+\frac{1}{16} a^2 x \left (6 A \left (8 c^2 d+4 c^3+7 c d^2+2 d^3\right )+B \left (42 c^2 d+16 c^3+36 c d^2+11 d^3\right )\right )+\frac{a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f} \]

[Out]

(a^2*(6*A*(4*c^3 + 8*c^2*d + 7*c*d^2 + 2*d^3) + B*(16*c^3 + 42*c^2*d + 36*c*d^2 + 11*d^3))*x)/16 + (a^2*(6*A*d
*(c^4 - 10*c^3*d - 44*c^2*d^2 - 40*c*d^3 - 12*d^4) - B*(2*c^5 - 12*c^4*d + 47*c^3*d^2 + 208*c^2*d^3 + 216*c*d^
4 + 64*d^5))*Cos[e + f*x])/(60*d^2*f) + (a^2*(6*A*d*(2*c^3 - 20*c^2*d - 57*c*d^2 - 30*d^3) - B*(4*c^4 - 24*c^3
*d + 96*c^2*d^2 + 284*c*d^3 + 165*d^4))*Cos[e + f*x]*Sin[e + f*x])/(240*d*f) + (a^2*(6*A*d*(c^2 - 10*c*d - 12*
d^2) - B*(2*c^3 - 12*c^2*d + 51*c*d^2 + 64*d^3))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(120*d^2*f) + (a^2*(6*A*
(c - 10*d)*d - B*(2*c^2 - 12*c*d + 55*d^2))*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(120*d^2*f) + (a^2*(2*B*c - 6
*A*d - 7*B*d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(30*d^2*f) - (B*Cos[e + f*x]*(a^2 + a^2*Sin[e + f*x])*(c +
d*Sin[e + f*x])^4)/(6*d*f)

________________________________________________________________________________________

Rubi [A]  time = 0.95209, antiderivative size = 464, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {2976, 2968, 3023, 2753, 2734} \[ \frac{a^2 \left (6 A d \left (-44 c^2 d^2-10 c^3 d+c^4-40 c d^3-12 d^4\right )-B \left (47 c^3 d^2+208 c^2 d^3-12 c^4 d+2 c^5+216 c d^4+64 d^5\right )\right ) \cos (e+f x)}{60 d^2 f}+\frac{a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac{a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (-12 c^2 d+2 c^3+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac{a^2 \left (6 A d \left (-20 c^2 d+2 c^3-57 c d^2-30 d^3\right )-B \left (96 c^2 d^2-24 c^3 d+4 c^4+284 c d^3+165 d^4\right )\right ) \sin (e+f x) \cos (e+f x)}{240 d f}+\frac{1}{16} a^2 x \left (6 A \left (8 c^2 d+4 c^3+7 c d^2+2 d^3\right )+B \left (42 c^2 d+16 c^3+36 c d^2+11 d^3\right )\right )+\frac{a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^3,x]

[Out]

(a^2*(6*A*(4*c^3 + 8*c^2*d + 7*c*d^2 + 2*d^3) + B*(16*c^3 + 42*c^2*d + 36*c*d^2 + 11*d^3))*x)/16 + (a^2*(6*A*d
*(c^4 - 10*c^3*d - 44*c^2*d^2 - 40*c*d^3 - 12*d^4) - B*(2*c^5 - 12*c^4*d + 47*c^3*d^2 + 208*c^2*d^3 + 216*c*d^
4 + 64*d^5))*Cos[e + f*x])/(60*d^2*f) + (a^2*(6*A*d*(2*c^3 - 20*c^2*d - 57*c*d^2 - 30*d^3) - B*(4*c^4 - 24*c^3
*d + 96*c^2*d^2 + 284*c*d^3 + 165*d^4))*Cos[e + f*x]*Sin[e + f*x])/(240*d*f) + (a^2*(6*A*d*(c^2 - 10*c*d - 12*
d^2) - B*(2*c^3 - 12*c^2*d + 51*c*d^2 + 64*d^3))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(120*d^2*f) + (a^2*(6*A*
(c - 10*d)*d - B*(2*c^2 - 12*c*d + 55*d^2))*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(120*d^2*f) + (a^2*(2*B*c - 6
*A*d - 7*B*d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(30*d^2*f) - (B*Cos[e + f*x]*(a^2 + a^2*Sin[e + f*x])*(c +
d*Sin[e + f*x])^4)/(6*d*f)

Rule 2976

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*B*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])
^(n + 1))/(d*f*(m + n + 1)), x] + Dist[1/(d*(m + n + 1)), Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x]
)^n*Simp[a*A*d*(m + n + 1) + B*(a*c*(m - 1) + b*d*(n + 1)) + (A*b*d*(m + n + 1) - B*(b*c*m - a*d*(2*m + n)))*S
in[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&
NeQ[c^2 - d^2, 0] && GtQ[m, 1/2] &&  !LtQ[n, -1] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])

Rule 2968

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 2753

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(d
*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(f*(m + 1)), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[
b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*
c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rule 2734

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((2*a*c
+ b*d)*x)/2, x] + (-Simp[((b*c + a*d)*Cos[e + f*x])/f, x] - Simp[(b*d*Cos[e + f*x]*Sin[e + f*x])/(2*f), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rubi steps

\begin{align*} \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx &=-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac{\int (a+a \sin (e+f x)) (c+d \sin (e+f x))^3 (a (6 A d+B (c+4 d))-a (2 B c-6 A d-7 B d) \sin (e+f x)) \, dx}{6 d}\\ &=-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac{\int (c+d \sin (e+f x))^3 \left (a^2 (6 A d+B (c+4 d))+\left (-a^2 (2 B c-6 A d-7 B d)+a^2 (6 A d+B (c+4 d))\right ) \sin (e+f x)-a^2 (2 B c-6 A d-7 B d) \sin ^2(e+f x)\right ) \, dx}{6 d}\\ &=\frac{a^2 (2 B c-6 A d-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac{\int (c+d \sin (e+f x))^3 \left (-3 a^2 d (B c-18 A d-16 B d)-a^2 \left (6 A (c-10 d) d-B \left (2 c^2-12 c d+55 d^2\right )\right ) \sin (e+f x)\right ) \, dx}{30 d^2}\\ &=\frac{a^2 \left (6 A (c-10 d) d-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac{a^2 (2 B c-6 A d-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac{\int (c+d \sin (e+f x))^2 \left (3 a^2 d \left (6 A d (11 c+10 d)-B \left (2 c^2-52 c d-55 d^2\right )\right )-3 a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \sin (e+f x)\right ) \, dx}{120 d^2}\\ &=\frac{a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac{a^2 \left (6 A (c-10 d) d-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac{a^2 (2 B c-6 A d-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac{\int (c+d \sin (e+f x)) \left (3 a^2 d \left (6 A d \left (31 c^2+50 c d+24 d^2\right )-B \left (2 c^3-132 c^2 d-267 c d^2-128 d^3\right )\right )-3 a^2 \left (6 A d \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right )-B \left (4 c^4-24 c^3 d+96 c^2 d^2+284 c d^3+165 d^4\right )\right ) \sin (e+f x)\right ) \, dx}{360 d^2}\\ &=\frac{1}{16} a^2 \left (6 A \left (4 c^3+8 c^2 d+7 c d^2+2 d^3\right )+B \left (16 c^3+42 c^2 d+36 c d^2+11 d^3\right )\right ) x+\frac{a^2 \left (6 A d \left (c^4-10 c^3 d-44 c^2 d^2-40 c d^3-12 d^4\right )-B \left (2 c^5-12 c^4 d+47 c^3 d^2+208 c^2 d^3+216 c d^4+64 d^5\right )\right ) \cos (e+f x)}{60 d^2 f}+\frac{a^2 \left (6 A d \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right )-B \left (4 c^4-24 c^3 d+96 c^2 d^2+284 c d^3+165 d^4\right )\right ) \cos (e+f x) \sin (e+f x)}{240 d f}+\frac{a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac{a^2 \left (6 A (c-10 d) d-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac{a^2 (2 B c-6 A d-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac{B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}\\ \end{align*}

Mathematica [A]  time = 3.14323, size = 437, normalized size = 0.94 \[ -\frac{a^2 \cos (e+f x) \left (60 \left (6 A \left (8 c^2 d+4 c^3+7 c d^2+2 d^3\right )+B \left (42 c^2 d+16 c^3+36 c d^2+11 d^3\right )\right ) \sin ^{-1}\left (\frac{\sqrt{1-\sin (e+f x)}}{\sqrt{2}}\right )+\sqrt{\cos ^2(e+f x)} \left (-16 \left (3 A d \left (5 c^2+10 c d+4 d^2\right )+B \left (30 c^2 d+5 c^3+36 c d^2+14 d^3\right )\right ) \cos (2 (e+f x))+12 d^2 (A d+3 B c+2 B d) \cos (4 (e+f x))+1440 A c^2 d \sin (e+f x)+2640 A c^2 d+240 A c^3 \sin (e+f x)+960 A c^3+1530 A c d^2 \sin (e+f x)-90 A c d^2 \sin (3 (e+f x))+2400 A c d^2+540 A d^3 \sin (e+f x)-60 A d^3 \sin (3 (e+f x))+756 A d^3+1530 B c^2 d \sin (e+f x)-90 B c^2 d \sin (3 (e+f x))+2400 B c^2 d+480 B c^3 \sin (e+f x)+880 B c^3+1620 B c d^2 \sin (e+f x)-180 B c d^2 \sin (3 (e+f x))+2268 B c d^2+545 B d^3 \sin (e+f x)-80 B d^3 \sin (3 (e+f x))+5 B d^3 \sin (5 (e+f x))+712 B d^3\right )\right )}{480 f \sqrt{\cos ^2(e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^3,x]

[Out]

-(a^2*Cos[e + f*x]*(60*(6*A*(4*c^3 + 8*c^2*d + 7*c*d^2 + 2*d^3) + B*(16*c^3 + 42*c^2*d + 36*c*d^2 + 11*d^3))*A
rcSin[Sqrt[1 - Sin[e + f*x]]/Sqrt[2]] + Sqrt[Cos[e + f*x]^2]*(960*A*c^3 + 880*B*c^3 + 2640*A*c^2*d + 2400*B*c^
2*d + 2400*A*c*d^2 + 2268*B*c*d^2 + 756*A*d^3 + 712*B*d^3 - 16*(3*A*d*(5*c^2 + 10*c*d + 4*d^2) + B*(5*c^3 + 30
*c^2*d + 36*c*d^2 + 14*d^3))*Cos[2*(e + f*x)] + 12*d^2*(3*B*c + A*d + 2*B*d)*Cos[4*(e + f*x)] + 240*A*c^3*Sin[
e + f*x] + 480*B*c^3*Sin[e + f*x] + 1440*A*c^2*d*Sin[e + f*x] + 1530*B*c^2*d*Sin[e + f*x] + 1530*A*c*d^2*Sin[e
 + f*x] + 1620*B*c*d^2*Sin[e + f*x] + 540*A*d^3*Sin[e + f*x] + 545*B*d^3*Sin[e + f*x] - 90*B*c^2*d*Sin[3*(e +
f*x)] - 90*A*c*d^2*Sin[3*(e + f*x)] - 180*B*c*d^2*Sin[3*(e + f*x)] - 60*A*d^3*Sin[3*(e + f*x)] - 80*B*d^3*Sin[
3*(e + f*x)] + 5*B*d^3*Sin[5*(e + f*x)])))/(480*f*Sqrt[Cos[e + f*x]^2])

________________________________________________________________________________________

Maple [A]  time = 0.077, size = 745, normalized size = 1.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x)

[Out]

1/f*(A*a^2*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-A*a^2*c^2*d*(2+sin(f*x+e)^2)*cos(f*x+e)+3*A*a^2*c*d^
2*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/5*A*a^2*d^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)
^2)*cos(f*x+e)-1/3*B*a^2*c^3*(2+sin(f*x+e)^2)*cos(f*x+e)+3*B*a^2*c^2*d*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos
(f*x+e)+3/8*f*x+3/8*e)-3/5*B*a^2*c*d^2*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+B*a^2*d^3*(-1/6*(sin(f*x
+e)^5+5/4*sin(f*x+e)^3+15/8*sin(f*x+e))*cos(f*x+e)+5/16*f*x+5/16*e)-2*A*a^2*c^3*cos(f*x+e)+6*A*a^2*c^2*d*(-1/2
*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2*A*a^2*c*d^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*A*a^2*d^3*(-1/4*(sin(f*x+e)^
3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+2*B*a^2*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2*B*a^2*c^2
*d*(2+sin(f*x+e)^2)*cos(f*x+e)+6*B*a^2*c*d^2*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-2/5
*B*a^2*d^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+A*a^2*c^3*(f*x+e)-3*A*a^2*c^2*d*cos(f*x+e)+3*A*a^2*c
*d^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/3*A*a^2*d^3*(2+sin(f*x+e)^2)*cos(f*x+e)-B*a^2*c^3*cos(f*x+e)
+3*B*a^2*c^2*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-B*a^2*c*d^2*(2+sin(f*x+e)^2)*cos(f*x+e)+B*a^2*d^3*(-
1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e))

________________________________________________________________________________________

Maxima [A]  time = 1.02168, size = 977, normalized size = 2.11 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

1/960*(240*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c^3 + 960*(f*x + e)*A*a^2*c^3 + 320*(cos(f*x + e)^3 - 3*cos(
f*x + e))*B*a^2*c^3 + 480*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a^2*c^3 + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*A
*a^2*c^2*d + 1440*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c^2*d + 1920*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^2*
c^2*d + 90*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*c^2*d + 720*(2*f*x + 2*e - sin(2*f*x
+ 2*e))*B*a^2*c^2*d + 1920*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^2*c*d^2 + 90*(12*f*x + 12*e + sin(4*f*x + 4*e
) - 8*sin(2*f*x + 2*e))*A*a^2*c*d^2 + 720*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c*d^2 - 192*(3*cos(f*x + e)^5
 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^2*c*d^2 + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^2*c*d^2 + 180*
(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*c*d^2 - 64*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3
 + 15*cos(f*x + e))*A*a^2*d^3 + 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^2*d^3 + 60*(12*f*x + 12*e + sin(4*f*
x + 4*e) - 8*sin(2*f*x + 2*e))*A*a^2*d^3 - 128*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^2*
d^3 + 5*(4*sin(2*f*x + 2*e)^3 + 60*f*x + 60*e + 9*sin(4*f*x + 4*e) - 48*sin(2*f*x + 2*e))*B*a^2*d^3 + 30*(12*f
*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*d^3 - 1920*A*a^2*c^3*cos(f*x + e) - 960*B*a^2*c^3*cos
(f*x + e) - 2880*A*a^2*c^2*d*cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 2.58673, size = 844, normalized size = 1.82 \begin{align*} -\frac{48 \,{\left (3 \, B a^{2} c d^{2} +{\left (A + 2 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )^{5} - 80 \,{\left (B a^{2} c^{3} + 3 \,{\left (A + 2 \, B\right )} a^{2} c^{2} d + 3 \,{\left (2 \, A + 3 \, B\right )} a^{2} c d^{2} +{\left (3 \, A + 4 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} - 15 \,{\left (8 \,{\left (3 \, A + 2 \, B\right )} a^{2} c^{3} + 6 \,{\left (8 \, A + 7 \, B\right )} a^{2} c^{2} d + 6 \,{\left (7 \, A + 6 \, B\right )} a^{2} c d^{2} +{\left (12 \, A + 11 \, B\right )} a^{2} d^{3}\right )} f x + 480 \,{\left ({\left (A + B\right )} a^{2} c^{3} + 3 \,{\left (A + B\right )} a^{2} c^{2} d + 3 \,{\left (A + B\right )} a^{2} c d^{2} +{\left (A + B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right ) + 5 \,{\left (8 \, B a^{2} d^{3} \cos \left (f x + e\right )^{5} - 2 \,{\left (18 \, B a^{2} c^{2} d + 18 \,{\left (A + 2 \, B\right )} a^{2} c d^{2} +{\left (12 \, A + 19 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} + 3 \,{\left (8 \,{\left (A + 2 \, B\right )} a^{2} c^{3} + 6 \,{\left (8 \, A + 9 \, B\right )} a^{2} c^{2} d + 6 \,{\left (9 \, A + 10 \, B\right )} a^{2} c d^{2} +{\left (20 \, A + 21 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/240*(48*(3*B*a^2*c*d^2 + (A + 2*B)*a^2*d^3)*cos(f*x + e)^5 - 80*(B*a^2*c^3 + 3*(A + 2*B)*a^2*c^2*d + 3*(2*A
 + 3*B)*a^2*c*d^2 + (3*A + 4*B)*a^2*d^3)*cos(f*x + e)^3 - 15*(8*(3*A + 2*B)*a^2*c^3 + 6*(8*A + 7*B)*a^2*c^2*d
+ 6*(7*A + 6*B)*a^2*c*d^2 + (12*A + 11*B)*a^2*d^3)*f*x + 480*((A + B)*a^2*c^3 + 3*(A + B)*a^2*c^2*d + 3*(A + B
)*a^2*c*d^2 + (A + B)*a^2*d^3)*cos(f*x + e) + 5*(8*B*a^2*d^3*cos(f*x + e)^5 - 2*(18*B*a^2*c^2*d + 18*(A + 2*B)
*a^2*c*d^2 + (12*A + 19*B)*a^2*d^3)*cos(f*x + e)^3 + 3*(8*(A + 2*B)*a^2*c^3 + 6*(8*A + 9*B)*a^2*c^2*d + 6*(9*A
 + 10*B)*a^2*c*d^2 + (20*A + 21*B)*a^2*d^3)*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 11.8445, size = 1865, normalized size = 4.02 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))**3,x)

[Out]

Piecewise((A*a**2*c**3*x*sin(e + f*x)**2/2 + A*a**2*c**3*x*cos(e + f*x)**2/2 + A*a**2*c**3*x - A*a**2*c**3*sin
(e + f*x)*cos(e + f*x)/(2*f) - 2*A*a**2*c**3*cos(e + f*x)/f + 3*A*a**2*c**2*d*x*sin(e + f*x)**2 + 3*A*a**2*c**
2*d*x*cos(e + f*x)**2 - 3*A*a**2*c**2*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a**2*c**2*d*sin(e + f*x)*cos(e +
f*x)/f - 2*A*a**2*c**2*d*cos(e + f*x)**3/f - 3*A*a**2*c**2*d*cos(e + f*x)/f + 9*A*a**2*c*d**2*x*sin(e + f*x)**
4/8 + 9*A*a**2*c*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*A*a**2*c*d**2*x*sin(e + f*x)**2/2 + 9*A*a**2*c*d
**2*x*cos(e + f*x)**4/8 + 3*A*a**2*c*d**2*x*cos(e + f*x)**2/2 - 15*A*a**2*c*d**2*sin(e + f*x)**3*cos(e + f*x)/
(8*f) - 6*A*a**2*c*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 9*A*a**2*c*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) -
3*A*a**2*c*d**2*sin(e + f*x)*cos(e + f*x)/(2*f) - 4*A*a**2*c*d**2*cos(e + f*x)**3/f + 3*A*a**2*d**3*x*sin(e +
f*x)**4/4 + 3*A*a**2*d**3*x*sin(e + f*x)**2*cos(e + f*x)**2/2 + 3*A*a**2*d**3*x*cos(e + f*x)**4/4 - A*a**2*d**
3*sin(e + f*x)**4*cos(e + f*x)/f - 5*A*a**2*d**3*sin(e + f*x)**3*cos(e + f*x)/(4*f) - 4*A*a**2*d**3*sin(e + f*
x)**2*cos(e + f*x)**3/(3*f) - A*a**2*d**3*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a**2*d**3*sin(e + f*x)*cos(e +
f*x)**3/(4*f) - 8*A*a**2*d**3*cos(e + f*x)**5/(15*f) - 2*A*a**2*d**3*cos(e + f*x)**3/(3*f) + B*a**2*c**3*x*sin
(e + f*x)**2 + B*a**2*c**3*x*cos(e + f*x)**2 - B*a**2*c**3*sin(e + f*x)**2*cos(e + f*x)/f - B*a**2*c**3*sin(e
+ f*x)*cos(e + f*x)/f - 2*B*a**2*c**3*cos(e + f*x)**3/(3*f) - B*a**2*c**3*cos(e + f*x)/f + 9*B*a**2*c**2*d*x*s
in(e + f*x)**4/8 + 9*B*a**2*c**2*d*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*B*a**2*c**2*d*x*sin(e + f*x)**2/2 +
 9*B*a**2*c**2*d*x*cos(e + f*x)**4/8 + 3*B*a**2*c**2*d*x*cos(e + f*x)**2/2 - 15*B*a**2*c**2*d*sin(e + f*x)**3*
cos(e + f*x)/(8*f) - 6*B*a**2*c**2*d*sin(e + f*x)**2*cos(e + f*x)/f - 9*B*a**2*c**2*d*sin(e + f*x)*cos(e + f*x
)**3/(8*f) - 3*B*a**2*c**2*d*sin(e + f*x)*cos(e + f*x)/(2*f) - 4*B*a**2*c**2*d*cos(e + f*x)**3/f + 9*B*a**2*c*
d**2*x*sin(e + f*x)**4/4 + 9*B*a**2*c*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/2 + 9*B*a**2*c*d**2*x*cos(e + f*x
)**4/4 - 3*B*a**2*c*d**2*sin(e + f*x)**4*cos(e + f*x)/f - 15*B*a**2*c*d**2*sin(e + f*x)**3*cos(e + f*x)/(4*f)
- 4*B*a**2*c*d**2*sin(e + f*x)**2*cos(e + f*x)**3/f - 3*B*a**2*c*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 9*B*a**
2*c*d**2*sin(e + f*x)*cos(e + f*x)**3/(4*f) - 8*B*a**2*c*d**2*cos(e + f*x)**5/(5*f) - 2*B*a**2*c*d**2*cos(e +
f*x)**3/f + 5*B*a**2*d**3*x*sin(e + f*x)**6/16 + 15*B*a**2*d**3*x*sin(e + f*x)**4*cos(e + f*x)**2/16 + 3*B*a**
2*d**3*x*sin(e + f*x)**4/8 + 15*B*a**2*d**3*x*sin(e + f*x)**2*cos(e + f*x)**4/16 + 3*B*a**2*d**3*x*sin(e + f*x
)**2*cos(e + f*x)**2/4 + 5*B*a**2*d**3*x*cos(e + f*x)**6/16 + 3*B*a**2*d**3*x*cos(e + f*x)**4/8 - 11*B*a**2*d*
*3*sin(e + f*x)**5*cos(e + f*x)/(16*f) - 2*B*a**2*d**3*sin(e + f*x)**4*cos(e + f*x)/f - 5*B*a**2*d**3*sin(e +
f*x)**3*cos(e + f*x)**3/(6*f) - 5*B*a**2*d**3*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 8*B*a**2*d**3*sin(e + f*x)*
*2*cos(e + f*x)**3/(3*f) - 5*B*a**2*d**3*sin(e + f*x)*cos(e + f*x)**5/(16*f) - 3*B*a**2*d**3*sin(e + f*x)*cos(
e + f*x)**3/(8*f) - 16*B*a**2*d**3*cos(e + f*x)**5/(15*f), Ne(f, 0)), (x*(A + B*sin(e))*(c + d*sin(e))**3*(a*s
in(e) + a)**2, True))

________________________________________________________________________________________

Giac [A]  time = 1.26544, size = 640, normalized size = 1.38 \begin{align*} -\frac{B a^{2} d^{3} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac{1}{16} \,{\left (24 \, A a^{2} c^{3} + 16 \, B a^{2} c^{3} + 48 \, A a^{2} c^{2} d + 42 \, B a^{2} c^{2} d + 42 \, A a^{2} c d^{2} + 36 \, B a^{2} c d^{2} + 12 \, A a^{2} d^{3} + 11 \, B a^{2} d^{3}\right )} x - \frac{{\left (3 \, B a^{2} c d^{2} + A a^{2} d^{3} + 2 \, B a^{2} d^{3}\right )} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac{{\left (4 \, B a^{2} c^{3} + 12 \, A a^{2} c^{2} d + 24 \, B a^{2} c^{2} d + 24 \, A a^{2} c d^{2} + 27 \, B a^{2} c d^{2} + 9 \, A a^{2} d^{3} + 10 \, B a^{2} d^{3}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac{{\left (16 \, A a^{2} c^{3} + 14 \, B a^{2} c^{3} + 42 \, A a^{2} c^{2} d + 36 \, B a^{2} c^{2} d + 36 \, A a^{2} c d^{2} + 33 \, B a^{2} c d^{2} + 11 \, A a^{2} d^{3} + 10 \, B a^{2} d^{3}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac{{\left (6 \, B a^{2} c^{2} d + 6 \, A a^{2} c d^{2} + 12 \, B a^{2} c d^{2} + 4 \, A a^{2} d^{3} + 5 \, B a^{2} d^{3}\right )} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} - \frac{{\left (16 \, A a^{2} c^{3} + 32 \, B a^{2} c^{3} + 96 \, A a^{2} c^{2} d + 96 \, B a^{2} c^{2} d + 96 \, A a^{2} c d^{2} + 96 \, B a^{2} c d^{2} + 32 \, A a^{2} d^{3} + 31 \, B a^{2} d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-1/192*B*a^2*d^3*sin(6*f*x + 6*e)/f + 1/16*(24*A*a^2*c^3 + 16*B*a^2*c^3 + 48*A*a^2*c^2*d + 42*B*a^2*c^2*d + 42
*A*a^2*c*d^2 + 36*B*a^2*c*d^2 + 12*A*a^2*d^3 + 11*B*a^2*d^3)*x - 1/80*(3*B*a^2*c*d^2 + A*a^2*d^3 + 2*B*a^2*d^3
)*cos(5*f*x + 5*e)/f + 1/48*(4*B*a^2*c^3 + 12*A*a^2*c^2*d + 24*B*a^2*c^2*d + 24*A*a^2*c*d^2 + 27*B*a^2*c*d^2 +
 9*A*a^2*d^3 + 10*B*a^2*d^3)*cos(3*f*x + 3*e)/f - 1/8*(16*A*a^2*c^3 + 14*B*a^2*c^3 + 42*A*a^2*c^2*d + 36*B*a^2
*c^2*d + 36*A*a^2*c*d^2 + 33*B*a^2*c*d^2 + 11*A*a^2*d^3 + 10*B*a^2*d^3)*cos(f*x + e)/f + 1/64*(6*B*a^2*c^2*d +
 6*A*a^2*c*d^2 + 12*B*a^2*c*d^2 + 4*A*a^2*d^3 + 5*B*a^2*d^3)*sin(4*f*x + 4*e)/f - 1/64*(16*A*a^2*c^3 + 32*B*a^
2*c^3 + 96*A*a^2*c^2*d + 96*B*a^2*c^2*d + 96*A*a^2*c*d^2 + 96*B*a^2*c*d^2 + 32*A*a^2*d^3 + 31*B*a^2*d^3)*sin(2
*f*x + 2*e)/f